package com.offcn.controller.Interceptions;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

@Configuration
public class WebMvcConfigure extends WebMvcConfigurationSupport {

    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        /**
         * 拦截所有路径的请求
         */
        registry.addInterceptor(new DemoInterceptor()).addPathPatterns("/*/**");
        super.addInterceptors(registry);

    }
}
